import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import 'normalize.css/normalize.css'
import directivePlugin from '@/directive'
import componentsPlugin from '@/plugins'

const app = createApp(App)
app.config.errorHandler = (err, vm, info) => {
    console.error(`${info}: ${err}`)
}

app.config.productionTip = false
app
.use(store)
.use(router)
.use(directivePlugin)
.use(componentsPlugin)
.mount('#app')

const _VM = app.config.globalProperties //导出globalProperties 方便调用
export {_VM as VM}